﻿komentarz@model MSDAL.Lekcje

@{
    ViewBag.Title = "Edit";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Edit</h2>


@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()
    
    <div class="form-horizontal">
        <h4>Lekcje</h4>
        <hr />
        @Html.ValidationSummary(true, "", new { @class = "text-danger" })
        @Html.HiddenFor(model => model.IDLekcji)

        <div class="form-group">
            @Html.LabelFor(model => model.IDUcznia, "IDUcznia", htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.DropDownList("IDUcznia", null, htmlAttributes: new { @class = "form-control" })
                @Html.ValidationMessageFor(model => model.IDUcznia, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.IDNauczyciela, "IDNauczyciela", htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.DropDownList("IDNauczyciela", null, htmlAttributes: new { @class = "form-control" })
                @Html.ValidationMessageFor(model => model.IDNauczyciela, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.IDInstrumentu, "IDInstrumentu", htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.DropDownList("IDInstrumentu", null, htmlAttributes: new { @class = "form-control" })
                @Html.ValidationMessageFor(model => model.IDInstrumentu, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Data, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Data, new { htmlAttributes = new { @id = "dataNowa", @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.Data, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.IDSali, "IDSali", htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.DropDownList("IDSali", null, htmlAttributes: new { @class = "form-control" })
                @Html.ValidationMessageFor(model => model.IDSali, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.CzyRozliczona, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                <div class="checkbox">
                    @Html.EditorFor(model => model.CzyRozliczona)
                    @Html.ValidationMessageFor(model => model.CzyRozliczona, "", new { @class = "text-danger" })
                </div>
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.CzyZatwierdzona, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                <div class="checkbox">
                    @Html.EditorFor(model => model.CzyZatwierdzona)
                    @Html.ValidationMessageFor(model => model.CzyZatwierdzona, "", new { @class = "text-danger" })
                </div>
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.CzyWyplacona, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                <div class="checkbox">
                    @Html.EditorFor(model => model.CzyWyplacona)
                    @Html.ValidationMessageFor(model => model.CzyWyplacona, "", new { @class = "text-danger" })
                </div>
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.CenaLekcjiUcznia, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.CenaLekcjiUcznia, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.CenaLekcjiUcznia, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.CenaLekcjiNauczyciela, htmlAttributes: new {@class = "control-label col-md-2"})
            <div class="col-md-10">
                @Html.EditorFor(model => model.CenaLekcjiNauczyciela, new {htmlAttributes = new {@class = "form-control"}})
                @Html.ValidationMessageFor(model => model.CenaLekcjiNauczyciela, "", new {@class = "text-danger"})
            </div>
        </div>

        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" value="Save" class="btn btn-default" />
            </div>
        </div>
    </div>
}

<div>
    @Html.ActionLink("Powrót do listy", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}

<script>
    /*
    window.onerror = function(errorMsg) {
        $('#console').html($('#console').html()+'<br>'+errorMsg)
    }*/
    $('#dataNowa').datetimepicker({
        dayOfWeekStart: 1,
        lang: 'en',
        disabledDates: ['1986/01/08', '1986/01/09', '1986/01/10'],
        startDate: '2015/01/05'
    });

    $('#dataPoPrzelozeniu').datetimepicker({
        dayOfWeekStart: 1,
        lang: 'en',
        disabledDates: ['1986/01/08', '1986/01/09', '1986/01/10'],
        startDate: '2015/01/05'
    });
</script>